package com.shaozi.nc.mq.substance;

import org.apache.log4j.Logger;
import org.json.JSONObject;

import com.shaozi.data.mq.business.base.SourceTypeConsts.Operation;
import com.shaozi.data.mq.business.bean.MQExchangeRuleBean;
import com.shaozi.data.mq.business.bean.MQPushItem;
import com.shaozi.data.mq.business.bus.substance.BasePushSubstanceHandler;
import com.shaozi.lib.throwable.SzException;
import com.shaozi.nc.mq.bean.base.BizBaseBean;
import com.shaozi.nc.mq.bean.operation.OperationBean;

/**
 * 
 * 运营系统
 * 
 * @author lyx
 *
 */
public class OperationPushSubstance extends BasePushSubstanceHandler {
	private final Logger logger = Logger.getLogger(OperationPushSubstance.class);

	public OperationPushSubstance() {

	}

	@Override
	protected void onExchangeBiz(MQExchangeRuleBean pushData, MQPushItem pushItem, JSONObject jsonObj)
			throws SzException {
		switch (pushItem.getSourceType()) {
		case Operation.Advice.Push:
			exchangeBiz(pushData, jsonObj, OperationBean.class);
			break;
		default:
			exchangeBiz(pushData, jsonObj, BizBaseBean.class);
			break;
		}
	}

}
